<cfinclude template="/ecada/header.cfm">
<html>
<head>
<title>ECADA - View experiments</title>
</head>

<body>

<!--- display all experiments in progress --->
<h2>Live experiments</h2>
<cfquery name = "live" datasource = "exp">
	select * 
	from experiment
	where live = 1 and userid = #session.id#
</cfquery>

<cfoutput>

<h2>Live experiments</h2>
<cfloop query = "live">
 <table border="1">

 <tr><th colspan=2>Experiment Details</th></tr>
 <tr>
 <td colspan=2>#live.title#</td></tr>
 <tr><td colspan=2>#live.description#</td>
 </tr>
 <tr>
 <td >Maximum experiments </td><td>#live.maxpart#</td></tr>
 <tr><td>Minimum experiments</td><td> #live.minpart#</td></td></tr>
 <tr><td>start date: </td><td>#live.startday#/#live.startmonth#/#live.startyear#</td></tr>
 <tr><td>end date: </td><td>#live.endday#/#live.endmonth#/#live.endyear#</td></tr>
 <!--- <tr><td>Number of Conditions </td><td>#conditions.cnt#</td></tr>
 <tr><td>Number of Participants </td><td>#numparticipants.cnt#</td></tr> --->

 </form>
 </td></tr>
 </table>
 <br><br>
</cfloop>

<!--- display all completed experiments --->
<h2>Completed experiments</h2>
<cfquery name = "offline" datasource = "exp">
	select * 
	from experiment
	 
	where live = 0 and userid = #session.id#
</cfquery>

<cfloop query = "offline">
 <table border="1">

 <tr><th colspan=2>Experiment Details</th></tr>
 <tr>
 <td colspan=2>#offline.title#</td></tr>
 <tr><td colspan=2>#offline.description#</td>
 </tr>
 <tr>
 <td >Maximum experiments </td><td>#offline.maxpart#</td></tr>
 <tr><td>Minimum experiments</td><td> #offline.minpart#</td></td></tr>
 <tr><td>start date: </td><td>#offline.startday#/#offline.startmonth#/#offline.startyear#</td></tr>
 <tr><td>end date: </td><td>#offline.endday#/#offline.endmonth#/#offline.endyear#</td></tr>
 <!--- <tr><td>Number of Conditions </td><td>#conditions.cnt#</td></tr>
 <tr><td>Number of Participants </td><td>#numparticipants.cnt#</td></tr> --->

</form>
</td></tr>
</table>
<br><br>
</cfloop>

</cfoutput>
</body>
</html>
<cfinclude template="/ecada/footer.cfm">
